package yunmouren.top.kaoui.tools;

import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;

public class tools {
    /**
     * 得到玩家实体
     * @param server
     * @param sender
     * @return
     */
    public static EntityPlayerMP getPlayer(MinecraftServer server, ICommandSender sender) {
        return server.getPlayerList().getPlayerByUsername(sender.getName());
    }
}
